package cn.tedu.review;
/*本类用于oop的知识回顾*/
public class TestCar {
    public static void main(String[] args) {
    car c=new car();
    //c.brand="宝马";
    //c.color="活力橙";
    //c.price=20000.98;
    //c.lenth=3.1;
       // System.out.println(c.brand);
       // System.out.println(c.price);
       // System.out.println(c.color);
       //System.out.println(c.length);
    c.start();
   // c.stop();
       c.setBrand("特斯拉");
       c.setColor("石墨绿");
       c.setPrice(210000.99);
       c.setLength(2.9);
        System.out.println(c.getBrand());
        System.out.println(c.getColor());
        System.out.println(c.getPrice());
        System.out.println(c.getLength());
        c.start();
    }

}
class car{
    private String brand;
    private String color;
    private double price;
    private double length;

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public double getLength() {
        return length;
    }

    public void setLength(double length) {
        this.length = length;
    }

    private void stop() {
        System.out.println("汽车停止了");

    }

    public void start() {
        System.out.println("汽车启动了");
        stop();
    }
}